Ibrahim Alzoubi

Fab Academy 2020 - "How to make almost anything"

Electronics Production Week

group assignment:
characterize the design rules for your PCB production process you can click here

This week we learned about the electronic board industry and have trusted my experience in this assignment


First we start with the machine used in the board and drilling tracks and cutting
monoFab SRM-20 Desktop Milling Machine

There are two types of Milling Bit used
It is 1/64 and used to make traces
1/32 and used for cutting

Image
We install Milling Bit in place and make sure it is installed correctly
Image This week the design is ready, so we will start preparing the design for the machine Image Image
We open the fab modules website Image
We import design image Image
We determine the type of machine we are working on Image
After that we adjust the settings as shown in the picture
First dpi, we leave it as is, if it is changed, there will be an error in the size of the board
We adjust the speed 2
Change the values of the X, Y and Z axes to zero
We put the cut depth
We place compensation more than 50
After that we save the document and export it to the desktop
Image


To adjust the settings of the z axis using a multimeter device we put one electrode on the blade and the second Milling Bit on the board will appear on the screen number 1 in addition to a sound
We adjust the X and Y axes, and keep in mind that the machine starts drilling from right to left
Image

We give the order to start cutting
Image
Image
After finishing the cutting process, we clean it using the Air pistol Image It produces the final shape of the board Image


The electronic components I used are listed in the below table.

Component Quantity
ATTiny 44 microcontroller 1
1uf Capacitor 1
100 Ohm Resistor 2
49 Ohm Resistor 1
0 Ohm Resistor 1
10K Ohm Resistor 1
pull up Resistors 1
20 MHz Crystal 1
1sp 1
Now we start the welding process Image
This is the final form of the board Image



PROGRAMMNING

to program the board in linux’s Ubuntu operating system, in order to do that we used a bootable usb to operate the PC from it.

After open Ubuntu on my PC , I have to install the necessary packages for AVR Programming. AVR is the family of the chip we used in our board Attiny44. To install the packages, I followed the below steps.

The below commands are not for the ISP but for my computer to install the necessary drivers & packages:


After installing these libraries, we had to install the firmware on the desktop and unzip it, by typing the following lines:

After that, I use the Arduino board to programming my board, but the first is to connect the Arduino with the computer and load the isp code in the examples into the Arduino program as shown in the pictures


Image
Image

After downloading the code, I connect the board to the Arduino as shown in the picture below

Image
Image
After connecting the board with the Arduino and connecting the Arduino to the computer then opened the terminal and now To delete any old executable files and add the updated file, type the following lines:
  • MAKE CLEAN :
  • Deletes existing executable files in the directory.
  • MAKE HEX :
  • Creates new updated files.
Then I opened the MakeFile and commented this line AVRDUDE = avrdude -c avrisp2 -P usb -p $(DEVICE) by adding a hashtag "#" and instead I typed AVRDUDE = avrdude -c stk500v1 -P /dev/ttyACM0 -b19200 -p $(DEVICE) Image

Then typed:
sudo make fuse : This links the executable file with the makefile.
sudo make program: This compiles the program.

Image
Here is my full terminal:
 
ubuntu@ubuntu:~$ sudo apt-get install flex byacc bison gcc libusb-dev avrdude
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:7.4.0-1ubuntu2.3).
bison is already the newest version (2:3.0.4.dfsg-1build1).
flex is already the newest version (2.6.4-6).
libusb-dev is already the newest version (2:0.1.12-31).
avrdude is already the newest version (6.3-4).
byacc is already the newest version (20140715-1build1).
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1 libwayland-egl1-mesa
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
ubuntu@ubuntu:~$ sudo apt-get install gcc-avr
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc-avr is already the newest version (1:5.4.0+Atmel3.6.0-1build1).
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1 libwayland-egl1-mesa
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
ubuntu@ubuntu:~$ sudo apt-get install avr-libc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
avr-libc is already the newest version (1:2.0.0+Atmel3.6.0-1).
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1 libwayland-egl1-mesa
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
ubuntu@ubuntu:~$ sudo apt-get install libc6-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6-dev is already the newest version (2.27-3ubuntu1).
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1 libwayland-egl1-mesa
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
ubuntu@ubuntu:~$ cd ~/Desktop
ubuntu@ubuntu:~/Desktop$ wget http://academy.cba.mit.edu/classes/embedded_programming/firmware.zip
--2020-02-25 11:36:03--  http://academy.cba.mit.edu/classes/embedded_programming/firmware.zip
Resolving academy.cba.mit.edu (academy.cba.mit.edu)... 18.27.130.25
Connecting to academy.cba.mit.edu (academy.cba.mit.edu)|18.27.130.25|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 141728 (138K) [application/zip]
Saving to: ‘firmware.zip’

firmware.zip              100%[==================================>] 138.41K  --.-KB/s    in 0.08s   

2020-02-25 11:36:05 (1.69 MB/s) - ‘firmware.zip’ saved [141728/141728]

ubuntu@ubuntu:~/Desktop$ unzip firmware.zip
Archive:  firmware.zip
   creating: fabISP_mac.0.8.2_firmware/
  inflating: fabISP_mac.0.8.2_firmware/.DS_Store  
   creating: __MACOSX/
   creating: __MACOSX/fabISP_mac.0.8.2_firmware/
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/._.DS_Store  
  inflating: fabISP_mac.0.8.2_firmware/main.c  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/._main.c  
  inflating: fabISP_mac.0.8.2_firmware/main.elf  
  inflating: fabISP_mac.0.8.2_firmware/main.hex  
  inflating: fabISP_mac.0.8.2_firmware/main.o  
  inflating: fabISP_mac.0.8.2_firmware/Makefile  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/._Makefile  
  inflating: fabISP_mac.0.8.2_firmware/usbconfig.h  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/._usbconfig.h  
   creating: fabISP_mac.0.8.2_firmware/usbdrv/
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/.DS_Store  
   creating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._.DS_Store  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/asmcommon.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._asmcommon.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/Changelog.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._Changelog.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/CommercialLicense.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._CommercialLicense.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/License.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._License.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/oddebug.c  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._oddebug.c  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/oddebug.h  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._oddebug.h  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/oddebug.o  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/Readme.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._Readme.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/USB-ID-FAQ.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._USB-ID-FAQ.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/USB-IDs-for-free.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._USB-IDs-for-free.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbconfig-prototype.h  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbconfig-prototype.h  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrv.c  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrv.c  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrv.h  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrv.h  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrv.o  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm.asm  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm.asm  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm.o  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm.S  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm.S  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm12.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm12.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm128.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm128.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm15.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm15.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm16.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm16.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm165.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm165.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm18-crc.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm18-crc.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbdrvasm20.inc  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbdrvasm20.inc  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/USBID-License.txt  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._USBID-License.txt  
  inflating: fabISP_mac.0.8.2_firmware/usbdrv/usbportability.h  
  inflating: __MACOSX/fabISP_mac.0.8.2_firmware/usbdrv/._usbportability.h  
ubuntu@ubuntu:~/Desktop$ cd fabISP_mac.0.8.2_firmware/
ubuntu@ubuntu:~/Desktop/fabISP_mac.0.8.2_firmware$ sudo make clean
rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.elf *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
ubuntu@ubuntu:~/Desktop/fabISP_mac.0.8.2_firmware$ sudo make hex
avr-gcc -Wall -Os -DF_CPU=20000000	 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -DF_CPU=20000000	 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -DF_CPU=20000000	 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -DF_CPU=20000000	 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c main.c -o main.o
main.c:88:13: warning: always_inline function might not be inlinable [-Wattributes]
 static void delay ( void )
             ^
avr-gcc -Wall -Os -DF_CPU=20000000	 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -o main.elf usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex
   text	   data	    bss	    dec	    hex	filename
      0	   1984	      0	   1984	    7c0	main.hex
ubuntu@ubuntu:~/Desktop/fabISP_mac.0.8.2_firmware$ sudo make fuse
avrdude -c stk500v1 -P /dev/ttyACM0 -b19200 -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9207 (probably t44)
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK (E:FF, H:DF, L:FF)

avrdude done.  Thank you.

ubuntu@ubuntu:~/Desktop/fabISP_mac.0.8.2_firmware$ sudo make program
avrdude -c stk500v1 -P /dev/ttyACM0 -b19200 -p attiny44 -U flash:w:main.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9207 (probably t44)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: writing flash (1984 bytes):

Writing | ################################################## | 100% 2.79s

avrdude: 1984 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex contains 1984 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.40s

avrdude: verifying ...
avrdude: 1984 bytes of flash verified

avrdude: safemode: Fuses OK (E:FF, H:DF, L:FF)

avrdude done.  Thank you.

avrdude -c stk500v1 -P /dev/ttyACM0 -b19200 -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9207 (probably t44)
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK (E:FF, H:DF, L:FF)

avrdude done.  Thank you.

ubuntu@ubuntu:~/Desktop/fabISP_mac.0.8.2_firmware$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 17ef:608c Lenovo 
Bus 001 Device 003: ID 17ef:608d Lenovo 
Bus 001 Device 002: ID 8087:0a2a Intel Corp. 
Bus 001 Device 009: ID 1781:0c9f Multiple Vendors USBtiny
Bus 001 Device 005: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ubuntu@ubuntu:~/Desktop/fabISP_mac.0.8.2_firmware$ 
        
        
        


download all file
group assignment